﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{

    /// <summary>
    /// 活动
    /// </summary>
    public class EM_activity
    {
        public EM_activity()
        {
            ID = Guid.NewGuid();

            Off = true;

            Part = true;

        }
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid ID { get; set; }


        /// <summary>
        /// 活动时间
        /// </summary>
        public DateTime ActivityTime { get; set; }

        [StringLength(8)]
        /// <summary>
        /// 活动名称
        /// </summary>
        public string? Name { get; set; }



        /// <summary>
        /// 活动是否有效
        /// </summary>
        public bool? Off { get; set; }


        /// <summary>
        /// 活动限制
        /// </summary>
        public Enumlimitation limitation { get; set; }

        /// <summary>
        /// 是否参加活动
        /// </summary>
        public bool? Part   { get; set; }




        public enum Enumlimitation
        {
            仅限第一单=0,
            仅限价格1000以内=1,
            仅限服装=2
        }
    }
}
